﻿using UnityEngine;
using System.Collections;

public class SSCPermissionAdapter {
	private static string _methodRequestRuntimePermission = "requestRuntimePermissionsForUnity3D";
	private static string _methodSetGameObjectName = "setGameObjectName";

	private static SSCPermissionAdapter _instance;

	public static SSCPermissionAdapter getInstance(){
		if (_instance == null)
			_instance = new SSCPermissionAdapter ();
		return _instance;
	}

	public void setGameObjectName(string name){
		AndroidHelper.getPermissionManagerAndroidObject ().Call (_methodSetGameObjectName, name);
	}

	public void requestRuntimePermissions(int requestCode,long permission){
				AndroidHelper.getPermissionManagerAndroidObject().Call (_methodRequestRuntimePermission, requestCode, permission);
	}

}
